//package com.yyb.controller;
//
//import com.yyb.annotation.AppPermission;
//import com.yyb.annotation.Log;
//import com.yyb.common.PageInfo;
//import com.yyb.dto.*;
//import com.yyb.enums.BusinessType;
//import com.yyb.service.TbStudentService;
//import com.yyb.vo.TbStudentVO;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.validation.Valid;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * 学生管理接口
// *
// * @author 尹一冰
// */
//@Tag(name = "学生管理接口")
//@RestController
//@RequestMapping("/api/student")
//@RequiredArgsConstructor
//public class TbStudentController {
//
//    private final TbStudentService studentService;
//
//    /** 条件分页查询 */
//    @Operation(summary = "分页查询学生列表")
//    @PostMapping("/page")
//    @AppPermission("system:student:query")
//    public PageInfo<TbStudentVO, TbStudentQueryDTO> list(@RequestBody TbStudentQueryDTO dto) {
//        return studentService.listStudentPage(dto);
//    }
//
//    /** 新增 */
//    @Operation(summary = "新增学生")
//    @PostMapping
//    @AppPermission("system:student:add")
//    @Log(title = "学生管理-新增", businessType = BusinessType.INSERT)
//    public TbStudentVO add(@RequestBody @Valid TbStudentAddDTO dto) {
//        return studentService.addStudent(dto);
//    }
//
//    /** 修改 */
//    @Operation(summary = "修改学生信息")
//    @PutMapping
//    @AppPermission("system:student:update")
//    @Log(title = "学生管理-修改", businessType = BusinessType.UPDATE)
//    public TbStudentVO update(@RequestBody @Valid TbStudentUpdateDTO dto) {
//        return studentService.updateStudent(dto);
//    }
//
//    /** 删除（单条） */
//    @Operation(summary = "删除学生")
//    @DeleteMapping("/{id}")
//    @AppPermission("system:student:remove")
//    @Log(title = "学生管理-删除", businessType = BusinessType.DELETE)
//    public void delete(@PathVariable Long id) {
//        studentService.deleteStudent(id);
//    }
//
//    /** 批量删除 */
//    @Operation(summary = "批量删除学生")
//    @DeleteMapping
//    @AppPermission("system:student:remove")
//    @Log(title = "学生管理-批量删除", businessType = BusinessType.DELETE)
//    public void deleteBatch(@RequestBody List<Long> ids) {
//        studentService.deleteStudentBatch(ids);
//    }
//
//    /** 查询详情 */
//    @Operation(summary = "查询学生详情")
//    @GetMapping("/{id}")
//    @AppPermission("system:student:query")
//    public TbStudentVO detail(@PathVariable Long id) {
//        return studentService.getStudent(id);
//    }
//}
